<include file="public@header" />
<style type="text/css">
	.img_format{
		width: 100px;
		margin-bottom: 5px;
	}
	.red_tip{
		color: #F00;
	}
</style>
<script src="__STATIC__/xigua/xgplayer.js?t=1574906138" type="text/javascript"></script>
<script src="__STATIC__/xigua/xgplayer-flv.js.js" type="text/javascript"></script>
<script src="__STATIC__/xigua/xgplayer-hls.js.js" type="text/javascript"></script>
<script src="__STATIC__/xigua/player.js" type="text/javascript"></script>

</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a >商品评论列表</a></li>

		</ul>
		<form class="well form-inline margin-top-20" method="post" action="{:url('Shopgoods/commentlist')}">
            
			提交时间：
			<input class="form-control js-bootstrap-date" name="start_time" id="start_time" value="{:input('request.start_time')}" aria-invalid="false" style="width: 110px;"> - 
            <input class="form-control js-bootstrap-date" name="end_time" id="end_time" value="{:input('request.end_time')}" aria-invalid="false" style="width: 110px;">
			
            评论内容： 
            <input class="form-control" type="text" name="keyword" style="width: 200px;" value="{:input('request.keyword')}"
                   placeholder="请输入评论内容关键词">
            <input type="hidden" name="goods_id" value="{$goods_id}">
			<input type="submit" class="btn btn-primary" value="搜索">
			<a class="btn btn-danger" href="{:url('Shopgoods/commentlist',array('goods_id'=>$goods_id))}">清空</a>
		</form>				
		<form method="post" class="js-ajax-form" >
			<div class="table-actions">
                <!-- <button class="btn btn-danger btn-sm js-ajax-submit" type="submit" data-action="{:url('Shopgoods/del')}"
                        data-subcheck="true">批量删除
                </button> -->

                <!-- <p class="help-block" style="font-weight: bold;">批量操作请谨慎</p> -->
            </div>
			<table class="table table-hover table-bordered">
				<thead>
					<tr>
						
						<th>ID</th>
						<th>买家用户信息</th>
						<th>订单ID</th>
						<th>卖家用户信息</th>
						<th>是否匿名</th>
						<th>评论内容</th>
						<th>评论视频</th>
						<th>评论图集</th>
						<th>产品质量评分</th>
						<th>客服态度评分</th>
						<th>物流速度评分</th>
						<th>评论时间</th>
						<th>{:lang('ACTIONS')}</th>
					</tr>
				</thead>
				<tbody>
					<foreach name="lists" item="vo">
					<tr>
						
						<td>{$vo.id}</td>
						<td>{$vo['userinfo']['user_nickname']} ({$vo.uid}) </td>
						<td>{$vo['orderid']}</td>
						<td>{$vo['shop_userinfo']['user_nickname']} ({$vo.shop_uid}) </td>
						<td><if condition="$vo['is_anonym'] eq '1'">是<else />否</if></td>
						<td style="max-width: 300px;">{$vo['content']}</td>
						<td style="width: 80px;">
							<if condition="$vo['video_url'] neq ''">
								<a href="javascript:void(0);" class="videoPlay" data-url="{$vo['video_url']}" >查看视频</a>
							<else />--</if>
						</td>
						<td>
							<foreach name="$vo['thumb_arr']" id="vl">
								<img src="{$vl}" class="imgtip img_format" />
							</foreach>
						</td>
						<td>{$vo['quality_points']}</td>
						<td>{$vo['service_points']}</td>
						<td>{$vo['express_points']}</td>
						<td>{:date('Y-m-d H:i:s',$vo['addtime'])}</td>
						<td>
							
                            
                            <a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('Shopgoods/delComment',array('id'=>$vo['id']))}">{:lang('DELETE')}</a>
						</td>
					</tr>


					<notempty name="$vo['append_comment']">

						<tr>
						
							<td>{$vo['append_comment']['id']}<br /><span class="red_tip">(追评)</span></td>
							<td>{$vo['append_comment']['userinfo']['user_nickname']} ({$vo['append_comment']['uid']}) </td>
							<td>{$vo['append_comment']['orderid']}</td>
							<td>{$vo['append_comment']['shop_userinfo']['user_nickname']} ({$vo['append_comment']['shop_uid']}) </td>
							<td><if condition="$vo['is_anonym'] eq '1'">是<else />否</if></td>
							<td style="max-width: 300px;">{$vo['append_comment']['content']}</td>
							

							<td>
								<if condition="$vo['append_comment']['video_url'] neq ''"><a href="javascript:void(0);" class="videoPlay" data-url="{$vo['append_comment']['video_url']}" >查看视频</a><else />--</if>
							</td>
							<td>
								<foreach name="$vo['append_comment']['thumb_arr']" id="va">
									<img src="{$va}" class="imgtip img_format" />
								</foreach>
							</td>
							<td>--</td>
							<td>--</td>
							<td>--</td>
							<td>{:date('Y-m-d H:i:s',$vo['append_comment']['addtime'])}</td>
							<td>
								
	                            
	                            <a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('Shopgoods/delComment',array('id'=>$vo['append_comment']['id']))}">{:lang('DELETE')}</a>
							</td>
						</tr>

					</notempty>





					</foreach>
				</tbody>
			</table>
			<div class="table-actions">
                <!-- <button class="btn btn-danger btn-sm js-ajax-submit" type="submit" data-action="{:url('Shopgoods/del')}"
                        data-subcheck="true">批量删除
                </button> -->

                <!-- <p class="help-block" style="font-weight: bold;">批量操作请谨慎</p> -->
            </div>
			<div class="pagination">{$page}</div>
		</form>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
	<script type="text/javascript">
    	$(function(){
    		Wind.use('layer');

    		$(".videoPlay").click(function(){

	    		var video_url=$(this).data('url');

	    		layer.open({
				  type: 2,
				  title: '视频播放',
				  shadeClose: true,
				  shade: 0.8,
				  area: ['700px', '90%'],
				  content: '/admin/Shopgoods/videoplay?url='+video_url //iframe的url
				});

	    	});
    	});


    	
    	
    </script>
</body>
</html>